import router from '@ohos.router'

export default {
    props: {
        currentPage:{
            default:'index'
        }
    },
    data:{

        toolBarArr:[
            {   value:"首页",
                icon:"首页.png",
                inActiveIcon:'首页选中.png',
                name:'index',
                path:'pages/index/index'
            },
            {   value:"分类",
                icon:"分类.png",
                inActiveIcon:'分类选中.png',
                name:'category',
                path:'pages/category/category'
            },
            {   value:"购物车",
                icon:"购物车.png",
                inActiveIcon:'购物车选中.png',
                name:'shoppingCart',
                path:'pages/shoppingCart/shoppingCart'
            },
            {   value:"我的",
                icon:"我的.png",
                inActiveIcon:'我的选中.png',
                name:'user',
                path:'pages/user/user'
            }
        ]
    },
    changePage(k){
        let path = this.toolBarArr[k].path;
        router.push({
            url:path,
        })
    }
}
